<script setup lang="ts">
import { ref } from 'vue'
import Child from '@/views/pre-learn/3_v-model/Child.vue'
import Child1 from '@/views/pre-learn/3_v-model/Child1.vue'
const info = ref(0)
const money = ref(1000)
const pageNO = ref(0)
const handler = (newMoney: number) => {
  console.log(newMoney)
  money.value = newMoney
}
</script>

<template>
  <div>
    <h1>v-model</h1>
    <input type="text" v-model="info" />
  </div>
  <hr />
  <Child :modelValue="money" @update:modelValue="handler" />
  <Child v-model="money" />
  <Child1 v-model:pageNo="pageNO" />
</template>

<style scoped></style>
